package com.qianniu.napi.admin.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.google.common.base.Strings;

import java.io.Serializable;

/**
 * <p>
 * 商品信息
 * </p>
 *
 * @author chenxuebin
 * @since 2018-09-08
 */
@TableName("t_goods_sku")
public class GoodsSku extends Model<GoodsSku> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 商品分类&
     */
	private Long cid;
    /**
     * 商品卖点#商品特色、卖点
     */

	private Long gid;

	private String characteristic;
    /**
     * 物流模板编号#物流模板编号，0 代表不使用物流
     */
	@TableField("logistics_id")
	private Long logisticsId;
    /**
     * 最低价
     */
	@TableField("min_price")
	private BigDecimal minPrice;
    /**
     * 商品原价&
     */
	private BigDecimal price;
    /**
     * 实际售价&
     */
	private BigDecimal saleprice;
    /**
     * 商品名&
     */
	private String name;
    /**
     * #商品编号&
     */
	@TableField("goods_no")
	private String goodsNo;
	private String extids;
	@TableField(exist = false)
	private String exts;
	private String ext1;
	private String ext2;
	private String ext3;
	private String ext4;
	private String ext5;

	@TableField(exist = false)
	private String skukey;

    /**
     * 收藏数
     */
	@TableField("number_fav")
	private Integer numberFav;
    /**
     * 好评数
     */
	@TableField("number_grade")
	private Integer numberGrade;
    /**
     * 订单数
     */
	@TableField("number_orders")
	private Integer numberOrders;
    /**
     * 销量数
     */
	@TableField("number_sale")
	private Integer numberSale;
    /**
     * 排序
     */
	private Integer paixu;
    /**
     * 起售时间
     */
	@TableField("date_start")
	private Date dateStart;
    /**
     * 停售时间
     */
	@TableField("date_end")
	private Date dateEnd;

    /**
     * 推荐指数
     */
	private Integer recommend;

    /**
     * 介绍
     */
	private String info;

	private String jieshao;
    /**
     * 启用状态&
     */
	private Integer state;

	private Integer xiangou;
	private Integer jifen;

    /**
     * 总库存数
     */
	private Integer stores;
    /**
     * 商品视频
     */
	@TableField("video_id")
	private Integer videoId;
    /**
     * 商品主图
     */
	private String pic;

    /**
     * 可扣除优惠券&
     */
	@TableField("max_use_coupon")
	private Integer maxUseCoupon;
    /**
     * 分享奖励类型@0：无奖励；1：送积分；2：送现金；3：送优惠券&
     */
	@TableField("share_bonus_type")
	private Integer shareBonusType;
    /**
     * 奖励额#奖励积分|现金|优惠券&
     */
	@TableField("share_mount")
	private Integer shareMount;
    /**
     * 商品二维码
     */
	private String barcode;
    /**
     * 商品重量：KG
     */
	private Double weight;
    /**
     * 浏览量
     */
	private Integer views;
	private Integer type;
	@TableField("user_id")
	private Long userId;
	private Long uid;
    /**
     * 商家id&
     */
	private Long mid;
	private Long mpid;
	private Long sid;

    /**
     * 是否支持会员卡交易
     */
	@TableField("is_member")
	private Integer isMember;
    /**
     * 是否支持积分抵扣交易
     */
	@TableField("is_jifen")
	private Integer isJifen;
    /**
     * 是否支持优惠券交易&
     */
	@TableField("is_coupon")
	private Integer isCoupon;
    /**
     * 是否热推&
     */
	@TableField("is_recommended")
	private Integer isRecommended;

    /**
     * 是否热卖&
     */
	@TableField("is_hot")
	private Integer isHot;

    /**
     * 可扣除积分&
     */
	@TableField("max_use_jifen")
	private Double maxUseJifen;

    /**
     * 包装清单
     */
	private String packinglist;
    /**
     * 售后服务
     */
	private String afterservice;
    /**
     * 产品介绍
     */
	private String introduction;
    /**
     * 产品类型@1：实物产品；2：虚拟产品；3：预约到店服务；4：预约上门服务&
     */
	private Integer gtype;
	private Date createtime;
	private Date modifytime;
	private Long modifier;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getCid() {
		return cid;
	}

	public void setCid(Long cid) {
		this.cid = cid;
	}

	public String getCharacteristic() {
		return characteristic;
	}

	public void setCharacteristic(String characteristic) {
		this.characteristic = characteristic;
	}

	public Long getLogisticsId() {
		return logisticsId;
	}

	public void setLogisticsId(Long logisticsId) {
		this.logisticsId = logisticsId;
	}

	public BigDecimal getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(BigDecimal minPrice) {
		this.minPrice = minPrice;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public BigDecimal getSaleprice() {
		return saleprice;
	}

	public void setSaleprice(BigDecimal saleprice) {
		this.saleprice = saleprice;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGoodsNo() {
		return goodsNo;
	}

	public void setGoodsNo(String goodsNo) {
		this.goodsNo = goodsNo;
	}

	public String getExtids() {
		return extids;
	}

	public void setExtids(String extids) {
		this.extids = extids;
	}

	public String getExts() {
		StringBuffer sb = new StringBuffer();
		if(!Strings.isNullOrEmpty(ext1)){
			sb.append(ext1);
		}
		if(!Strings.isNullOrEmpty(ext2)){
			sb.append("，"+ext2);
		}
		if(!Strings.isNullOrEmpty(ext3)){
			sb.append("，"+ext3);
		}
		if(!Strings.isNullOrEmpty(ext4)){
			sb.append("，"+ext4);
		}
		if(!Strings.isNullOrEmpty(ext5)){
			sb.append("，"+ext5);
		}
		return sb.toString();
	}

	public void setExts(String exts) {
		this.exts = exts;
	}

	public String getExt1() {
		return ext1;
	}

	public void setExt1(String ext1) {
		this.ext1 = ext1;
	}

	public String getExt2() {
		return ext2;
	}

	public void setExt2(String ext2) {
		this.ext2 = ext2;
	}

	public String getExt3() {
		return ext3;
	}

	public void setExt3(String ext3) {
		this.ext3 = ext3;
	}

	public String getExt4() {
		return ext4;
	}

	public void setExt4(String ext4) {
		this.ext4 = ext4;
	}

	public String getExt5() {
		return ext5;
	}

	public void setExt5(String ext5) {
		this.ext5 = ext5;
	}

	public Integer getNumberFav() {
		return numberFav;
	}

	public void setNumberFav(Integer numberFav) {
		this.numberFav = numberFav;
	}

	public Integer getNumberGrade() {
		return numberGrade;
	}

	public void setNumberGrade(Integer numberGrade) {
		this.numberGrade = numberGrade;
	}

	public Integer getNumberOrders() {
		return numberOrders;
	}

	public void setNumberOrders(Integer numberOrders) {
		this.numberOrders = numberOrders;
	}

	public Integer getNumberSale() {
		return numberSale;
	}

	public void setNumberSale(Integer numberSale) {
		this.numberSale = numberSale;
	}

	public Integer getPaixu() {
		return paixu;
	}

	public void setPaixu(Integer paixu) {
		this.paixu = paixu;
	}

	public Date getDateStart() {
		return dateStart;
	}

	public void setDateStart(Date dateStart) {
		this.dateStart = dateStart;
	}

	public Date getDateEnd() {
		return dateEnd;
	}

	public void setDateEnd(Date dateEnd) {
		this.dateEnd = dateEnd;
	}


	public Integer getRecommend() {
		return recommend;
	}

	public void setRecommend(Integer recommend) {
		this.recommend = recommend;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getStores() {
		return stores;
	}

	public void setStores(Integer stores) {
		this.stores = stores;
	}

	public Integer getVideoId() {
		return videoId;
	}

	public void setVideoId(Integer videoId) {
		this.videoId = videoId;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public Integer getIsHot() {
		return isHot;
	}

	public void setIsHot(Integer isHot) {
		this.isHot = isHot;
	}

	public Integer getMaxUseCoupon() {
		return maxUseCoupon;
	}

	public void setMaxUseCoupon(Integer maxUseCoupon) {
		this.maxUseCoupon = maxUseCoupon;
	}

	public Integer getShareBonusType() {
		return shareBonusType;
	}

	public void setShareBonusType(Integer shareBonusType) {
		this.shareBonusType = shareBonusType;
	}

	public Integer getShareMount() {
		return shareMount;
	}

	public void setShareMount(Integer shareMount) {
		this.shareMount = shareMount;
	}

	public String getBarcode() {
		return barcode;
	}

	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	public Integer getViews() {
		return views;
	}

	public void setViews(Integer views) {
		this.views = views;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUid() {
		return uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	public Long getMid() {
		return mid;
	}

	public void setMid(Long mid) {
		this.mid = mid;
	}

	public Long getMpid() {
		return mpid;
	}

	public void setMpid(Long mpid) {
		this.mpid = mpid;
	}

	public Integer getIsMember() {
		return isMember;
	}

	public void setIsMember(Integer isMember) {
		this.isMember = isMember;
	}

	public Integer getIsJifen() {
		return isJifen;
	}

	public void setIsJifen(Integer isJifen) {
		this.isJifen = isJifen;
	}

	public Integer getIsCoupon() {
		return isCoupon;
	}

	public void setIsCoupon(Integer isCoupon) {
		this.isCoupon = isCoupon;
	}

	public Integer getXiangou() {
		return xiangou;
	}

	public void setXiangou(Integer xiangou) {
		this.xiangou = xiangou;
	}

	public Integer getIsRecommended() {
		return isRecommended;
	}

	public void setIsRecommended(Integer isRecommended) {
		this.isRecommended = isRecommended;
	}

	public Double getMaxUseJifen() {
		return maxUseJifen;
	}

	public void setMaxUseJifen(Double maxUseJifen) {
		this.maxUseJifen = maxUseJifen;
	}

	public String getPackinglist() {
		return packinglist;
	}

	public void setPackinglist(String packinglist) {
		this.packinglist = packinglist;
	}

	public String getAfterservice() {
		return afterservice;
	}

	public void setAfterservice(String afterservice) {
		this.afterservice = afterservice;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public Integer getGtype() {
		return gtype;
	}

	public void setGtype(Integer gtype) {
		this.gtype = gtype;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getModifytime() {
		return modifytime;
	}

	public void setModifytime(Date modifytime) {
		this.modifytime = modifytime;
	}

	public Long getModifier() {
		return modifier;
	}

	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	public Long getSid() {
		return sid;
	}

	public void setSid(Long sid) {
		this.sid = sid;
	}

	public Integer getJifen() {
		return jifen;
	}

	public void setJifen(Integer jifen) {
		this.jifen = jifen;
	}

	public Long getGid() {
		return gid;
	}

	public void setGid(Long gid) {
		this.gid = gid;
	}

	public String getJieshao() {
		return jieshao;
	}

	public void setJieshao(String jieshao) {
		this.jieshao = jieshao;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "GoodsSku{" +
			"id=" + id +
			", cid=" + cid +
			", characteristic=" + characteristic +
			", logisticsId=" + logisticsId +
			", minPrice=" + minPrice +
			", price=" + price +
			", saleprice=" + saleprice +
			", name=" + name +
			", goodsNo=" + goodsNo +
			", ext1=" + ext1 +
			", ext2=" + ext2 +
			", ext3=" + ext3 +
			", ext4=" + ext4 +
			", ext5=" + ext5 +
			", numberFav=" + numberFav +
			", numberGrade=" + numberGrade +
			", numberOrders=" + numberOrders +
			", numberSale=" + numberSale +
			", paixu=" + paixu +
			", dateStart=" + dateStart +
			", dateEnd=" + dateEnd +
			", recommend=" + recommend +
			", info=" + info +
			", state=" + state +
			", stores=" + stores +
			", videoId=" + videoId +
			", pic=" + pic +
			", maxUseCoupon=" + maxUseCoupon +
			", shareBonusType=" + shareBonusType +
			", shareMount=" + shareMount +
			", barcode=" + barcode +
			", weight=" + weight +
			", views=" + views +
			", type=" + type +
			", userId=" + userId +
			", uid=" + uid +
			", mid=" + mid +
			", mpid=" + mpid +
			", isMember=" + isMember +
			", isJifen=" + isJifen +
			", isCoupon=" + isCoupon +
			", isRecommended=" + isRecommended +
			", maxUseJifen=" + maxUseJifen +
			", packinglist=" + packinglist +
			", afterservice=" + afterservice +
			", introduction=" + introduction +
			", gtype=" + gtype +
			", createtime=" + createtime +
			", modifytime=" + modifytime +
			", modifier=" + modifier +
			"}";
	}
}
